<?php $this->headLink()
->appendStylesheet($this->js('css/jquery.alerts.css'))
?>
<?php $this->headScript()
->appendFile($this->js('plugins/jquery.alerts.js'))
->captureStart()?>
<?php if ($this->message):?>
var res = <?php echo $this->message?>;
$(document).ready(function(){
    if (res.error) {
        var message = '';
        $.each(res.error,function(i,val){
                $("#"+i).addClass('ui-state-error');
                $.each(val,function(ii,vv){
                    message += $("#"+i+"-label label").html()+': '+ vv+ "\n";
                });
        });
        jAlert(message, '<?php echo $this->translate('checking errors')?>');
    }
    else {
    jAlert('ok','<?php echo $this->translate('set completed')?>');
    }
});
<?php endif?>
<?php $this->headScript()->captureEnd()?>
<div style="margin:5px;padding:10px;border:#ccc solid thin">
<?php echo $this->form?>
</div>
